﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class Base_Extensions
{
    public static DG.Tweening.Tweener DOColor(this SpriteRenderer widget, long color, float duration)
    {
        Color c = CommonUtil.toColor((uint)(color & 0xffffffff));
        DG.Tweening.Tweener t = DG.Tweening.DOTween.To(() => widget.color, x => widget.color = x, c, duration);
        return t;
    }
    
    // public static DG.Tweening.Tweener DOAlpha(this SpriteRenderer widget, float alpha, float duration)
    // {
    //     DG.Tweening.Tweener t = DG.Tweening.DOTween.To(() => widget.alpha, x => widget.alpha = x, alpha, duration);
    //     return t;
    // }
}
